"""create Photo table

Revision ID: 939b77481d94
Revises: 379ae812db73
Create Date: 2020-05-29 19:42:35.245579

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '939b77481d94'
down_revision = '379ae812db73'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('photos',
    sa.Column('created_at', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=True),
    sa.Column('updated_at', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=True),
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('photo_id', sa.String(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_photos_id'), 'photos', ['id'], unique=True)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_photos_id'), table_name='photos')
    op.drop_table('photos')
    # ### end Alembic commands ###
